package com.woniuxy.bank.api.access.fallback;

import com.woniuxy.bank.api.access.TradeLogApi;
import com.woniuxy.sddfp.common.model.dto.bank.BankCardAddDTO;
import com.woniuxy.sddfp.common.model.dto.bank.SignatureDto;
import com.woniuxy.sddfp.common.model.dto.bid.BankBidDTO;
import com.woniuxy.sddfp.common.model.dto.bid.BidBalanceDTO;
import com.woniuxy.sddfp.common.model.vo.trade.BorrowSyncRecordVo;
import com.woniuxy.sddfp.common.result.Result;
import org.springframework.stereotype.Component;

/**
 * @author yellow Doctor
 * @date 2025-06-26
 * @desc 蜗牛创想：www.woniuxy.com
 */
@Component     //不能添加到ioc容器中 不能服务降级 
public class TradeLogApiFallBack implements TradeLogApi {

    @Override
    public SignatureDto proxyBindCardLog(BankCardAddDTO bankCardAddDTO) {

        //失败了给一个默认值
        SignatureDto signatureDto = new SignatureDto();

        signatureDto.setBankUrl("xxx");
        signatureDto.setPlatformNo("xxx");
        signatureDto.setReqData("系统繁忙中、稍后重试....");
        signatureDto.setReqCode("xxx");

        return signatureDto;

    }

    @Override
    public String testPort() {
        return "";
    }

    @Override
    public Result syncBorrowRecord(BorrowSyncRecordVo borrowSyncRecordVo) {
        return Result.fail("远程调用同步借款数据失败！");
    }

    @Override
    public Result<BidBalanceDTO> getBidBalance(String userCode) {
        return null;
    }

    @Override
    public Result<String> bankBidService(BankBidDTO bankBidDTO) {
        return null;
    }
}
